﻿angular.module('resources.agingDownloadProxy', []);
angular.module('resources.agingDownloadProxy').factory('agingDownloadProxy', ['rresource', '$http', 'APPSETTING', function (rresource, $http, APPSETTING) {
    var factory = rresource('agingDownload');

    factory.refreshDownloadFile = function (successcb, failedcb) {

        $http({
            url: APPSETTING['serverUrl'] + '/api/agingDownload',
            method: 'POST'
        }).success(function (response) {
            successcb(response);
        }).error(function (ex) {
            failedcb(ex);
        });
    };

    return factory;
} ]);
